import request from '@/utils/request'

export function dataListApi(params) {
  return request({
    url: '/api/dept/data',
    method: 'get',
    params
  })
}


export function findByIdApi(id) {
  return request({
    url: '/api/dept/'+id,
    method: 'get'
  })
}

// 新增字典类型
export function addApi(data) {
  return request({
    url: '/api/dept',
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function editApi(data) {
  return request({
    url: '/api/dept',
    method: 'put',
    data: data
  })
}

// 删除字典类型
export function deleteApi(ids) {
  return request({
    url: '/api/dept/' + ids,
    method: 'delete'
  })
}
